Skip to content

fix(@angular-devkit/build-angular): conditionally enable deprecated Less stylesheet JavaScript support#25639

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:esbuild/less-inline-js
Oct 11, 2023
Merged

fix(@angular-devkit/build-angular): conditionally enable deprecated Less stylesheet JavaScript support#25639
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:esbuild/less-inline-js

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Aug 4, 2023

When a Less stylesheet is detected to require the deprecated javascriptEnabled Less option, the option is enabled for the stylesheet and a warning is issued to inform the user of the behavior change. The Less javascriptEnabled option has been deprecated and disabled by default since Less v3 (https://github.com/less/less.js/releases/tag/v3.0.0). When enabled, the javascriptEnabled option allows JavaScript within Less stylesheets to be executed at build time.

Less option reference: https://lesscss.org/usage/#less-options

This provides similar behavior to the default Webpack-based build system. However, the Webpack-based build system currently unconditionally enables the option.

Closes #25572

@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Aug 30, 2023
@xunjianxiang
Copy link
Copy Markdown

Is there any progress?
I think it is necesary.
or another way to custom vite config.

@clydin clydin added target: major This PR is targeted for the next major release and removed needs: discussion On the agenda for team meeting to determine next steps labels Oct 11, 2023
@clydin clydin linked an issue Oct 11, 2023 that may be closed by this pull request
…ess stylesheet JavaScript support

When a Less stylesheet is detected to require the deprecated `javascriptEnabled` Less option, the option
is enabled for the stylesheet and a warning is issued to inform the user of the behavior change. The
Less `javascriptEnabled` option has been deprecated and disabled by default since Less v3 (https://github.com/less/less.js/releases/tag/v3.0.0).
When enabled, the `javascriptEnabled` option allows JavaScript within Less stylesheets to be executed at build time.

Less option reference: https://lesscss.org/usage/#less-options

This provides similar behavior to the default Webpack-based build system. However, the Webpack-based build system
currently unconditionally enables the option.
@clydin clydin force-pushed the esbuild/less-inline-js branch from 8778bb0 to d85cbf6 Compare October 11, 2023 14:59
@clydin clydin marked this pull request as ready for review October 11, 2023 15:00
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 11, 2023
@clydin clydin added this to the v17 milestone Oct 11, 2023
@clydin clydin requested a review from alan-agius4 October 11, 2023 15:00
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 11, 2023
@alan-agius4 alan-agius4 merged commit c12f98f into angular:main Oct 11, 2023
@clydin clydin deleted the esbuild/less-inline-js branch October 11, 2023 19:19
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular 16 esbuild: inline JavaScript is not enabled of less

3 participants